package com.lrc.springcloud.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Administrator
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
public class CommonResult<T> {
    @ApiModelProperty(value = "响应码",name = "code",required = true,example = "200")
    private Integer code;
    @ApiModelProperty(value = "响应消息",name = "message",required = true)
    private String message;
    @ApiModelProperty(value = "响应数据",name = "data",required = true)
    private T data;

    public CommonResult(Integer code, String message) {
        this(code, message, null);
    }
}

